import request from '../../utils/request'

export const userApi = {
    getList(params) {
        return request({
            url: '/user/account/list',
            method: 'get',
            params
        })
    },

    create(data) {
        return request({
            url: '/user/account/create',
            method: 'post',
            data
        })
    },

    update(data) {
        return request({
            url: '/user/account/update',
            method: 'put',
            data
        })
    },

    delete(id) {
        return request({
            url: `/user/account/remove/${id}`,
            method: 'delete'
        })
    },

    batchDelete(ids) {
        return request({
            url: '/user/account/remove/batch',
            method: 'delete',
            data: ids
        })
    },

    getInfo(id) {
        return request({
            url: `/user/account/info/${id}`,
            method: 'get'
        })
    }
}
